package com.effvi.web.api.taobao;

import java.io.IOException;
import java.util.Properties;

import org.apache.log4j.Logger;

/**
 * 
 * @author kelvin
 * @date 2012-7-22 下午7:28:44
 * @since 1.0
 */
public class Config {
	
	private static final Logger log = Logger.getLogger(Config.class);
	
	private static Properties pros = new Properties();
	/*
	 * 艾维网(应用key)
	 */
	public static String AppKey = "";
	/*
	 * 艾维网(应用密钥)
	 */
	public static String AppSerect = "";
	/*
	 * 淘宝Api调用地址
	 */
	public static String ApiUrl = "";
	/*
	 * 淘宝账号（昵称）
	 */
	public static String NickName = "";
	/*
	 * 淘宝账号（数字Id）
	 */
	public static String UserId = "";
	/*
	 * 淘宝客PID
	 */
	public static String Pid = "";
	
	static{
		try {
			pros.load(Config.class.getResourceAsStream("/config/taobaoke/taobaoke.properties"));
			AppKey = pros.getProperty("taobaoke.api.appkey");
			AppSerect = pros.getProperty("taobaoke.api.appsecret");
			ApiUrl = pros.getProperty("taobaoke.api.appurl");
			NickName = pros.getProperty("taobaoke.api.user.nickname");
			UserId = pros.getProperty("taobaoke.api.user.userid");
			Pid = pros.getProperty("taobaoke.api.user.pid");
		} catch (IOException e) {
			log.error("加载淘宝客配置出错!", e);
		}
	}
}
